using System;
using System.Collections.Generic;
using System.Text;
using System.Runtime.InteropServices;
using System.Security.Permissions;
using Microsoft.SharePoint;
using Microsoft.SharePoint.WebControls;
using Microsoft.SharePoint.Security;

namespace CustomFieldTypes
{
    [CLSCompliant(false)]
    [Guid("b175dab8-e5ee-4973-bb11-0d7c2237e270")]
    public class CustomMultiChoiceField : SPFieldMultiChoice
    {
        public CustomMultiChoiceField(SPFieldCollection fields, string fieldName)
            : base(fields, fieldName)
        {
        }
        public CustomMultiChoiceField(SPFieldCollection fields, string typeName, string displayName)
            : base(fields, typeName, displayName)
        {
        }
        public override BaseFieldControl FieldRenderingControl
        {
            [SharePointPermission(SecurityAction.LinkDemand, ObjectModel = true)]
            get
            {
                BaseFieldControl fieldControl = new CustomMultiChoiceFieldControl();
                fieldControl.FieldName = this.InternalName;
                return fieldControl;
            }
        }
    }
}
